package com.fan.context;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class ThreeServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
           doGet(request,response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          String  file01="a.mp3";
          String  file02="b.png";
          String mimeType01 = getServletContext().getMimeType(file01);
          String mimeType02 = getServletContext().getMimeType(file02);
          String value=getServletContext().getInitParameter("bkey");
          response.getWriter().print("servletDemo03..."+mimeType01+":"+mimeType02+":"+value);
    }
}
